home *** CD-ROM | disk | FTP | other *** search
/ Chip: 2001 Haziran / CHIP Haziran2001.iso / prog / haziran / 20 / setup.exe / {app} / plugins / XQ Context Menu Options 3.xpl < prev    next >
Encoding:
XSetup plugin  |  2001-03-28  |  2.5 KB  |  99 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="6"
  3. "COUNT"="2"
  4. "UIPATH 1"="Appearance\Files&Folders\Folders Context Menu"
  5. "UIPATH 2"="Appearance\Files&Folders\Drives"
  6. "NAME"="DOS prompt here Context Menu"
  7. "VERSION"="2.13"
  8. "LANGUAGE"="VBScript"
  9. "TEXT 1"="Enable "DOS Prompt Here" command for directories"
  10. "TEXT 2"="Enable "DOS Prompt Here" command for drive root"
  11. "DESCRIPTION 1"="If "DOS Prompt Here" is enabled, the command "DOS Prompt Here" will appear if you right-click a folder.  Choosing this option will open a Command Prompt window at the folder's location."
  12. "AUTHOR"="Xteq Systems"
  13. "CONTACTURL"="http://www.xteq.com"
  14. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  15. "COMMENT 1"="Item "drive root" added by Pierre Szwarc"
  16. "COMMENT 2"="Thanks to Josef Angstenberger [mailto:josef@jtxa.de] for the drive DOS Prompt idea!"
  17. "COMMENT 3"="Win9x/Me fix implemented by Neil R. Turner [totalxs@hotmail.com]"
  18.  
  19.  
  20.  
  21.  
  22. bQE=true
  23. bDH=true
  24. bDH2=true
  25. Sub Plugin_Initialize 
  26.  s=RegReadValue("HKCR\Directory\Shell\DosHere\Command\@")
  27.  'Call DebugMsg(s)
  28.  if Len(s)>0 then
  29.     SetUIElement 1,true
  30.  else
  31.     bDH=false
  32.  end if 
  33.  
  34.  s=RegReadValue("HKCR\Drive\Shell\DosHere\Command\@")
  35.  'Call DebugMsg(s)
  36.  if Len(s)>0 then
  37.     SetUIElement 2,true
  38.  else
  39.     bDH2=false
  40.  end if 
  41. End Sub
  42.  
  43. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  44.  w=GetWinVer
  45.  If w=2 OR 4 then
  46.   bW9x=1
  47.  end if
  48.  
  49.  s=""
  50.  b=GetUIElement(1)
  51.  if b=true then
  52.   if bW9x=1 then
  53.      s=GetWinDir
  54.      s=s & "command.com /k cd ""%1"""
  55.   else
  56.      'Windows NT/2000
  57.      s=GetWinSysDir
  58.      s=s & "cmd.exe /k cd ""%1"""
  59.   end if
  60.  
  61.   Call RegWriteValue("HKCR\Directory\Shell\DosHere\@","DOS &Prompt Here",1)
  62.   Call RegWriteValue("HKCR\Directory\Shell\DosHere\Command\@",s,1)
  63.  else 'Disable it!
  64.   if bDH=true then
  65.      Call RegDeletePath("HKCR\Directory\Shell\DosHere\Command")
  66.      Call RegDeletePath("HKCR\Directory\Shell\DosHere")
  67.   end if
  68.  end if
  69.  
  70.  
  71.  
  72.  s=""
  73.  b=GetUIElement(2)
  74.  if b=true then
  75.   if bW9x=1 then
  76.      'Windows 95/98/ME
  77.      s=GetWinDir
  78.      s=s & "command.com /k cd ""%1"""
  79.   else
  80.      'Windows NT/2000
  81.      s=GetWinSysDir
  82.      s=s & "cmd.exe /k cd ""%1"""
  83.   end if
  84.  
  85.   Call RegWriteValue("HKCR\Drive\Shell\DosHere\@","DOS &Prompt Here",1)
  86.   Call RegWriteValue("HKCR\Drive\Shell\DosHere\Command\@",s,1)
  87.  else 'Disable it!
  88.   if bDH2=true then
  89.      Call RegDeletePath("HKCR\Drive\Shell\DosHere\Command")
  90.      Call RegDeletePath("HKCR\Drive\Shell\DosHere")
  91.   end if
  92.  end if
  93.  
  94.  
  95. End Sub
  96.  
  97. Sub Plugin_Terminate 
  98. End Sub
  99.